package com.wanmait.employment.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wanmait.employment.entity.RecruitmentEducation;
import com.wanmait.employment.mapper.RecruitmentEducationMapper;
import com.wanmait.employment.service.RecruitmentEducationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RecruitmentEducationServiceImpl implements RecruitmentEducationService {


    @Resource
    private RecruitmentEducationMapper recruitmentEducationMapper;
    @Override
    public List<RecruitmentEducation> selectList(String title) {
        QueryWrapper<RecruitmentEducation> queryWrapper=new QueryWrapper<>();
        queryWrapper.like("title",title);
        List<RecruitmentEducation> recruitmentEducations= recruitmentEducationMapper.selectList(queryWrapper);
        return recruitmentEducations;
    }

    @Override
    public Integer update(RecruitmentEducation recruitmentEducation) {
        return recruitmentEducationMapper.updateById(recruitmentEducation);
    }

    @Override
    public Integer insert(RecruitmentEducation recruitmentEducation) {
        return recruitmentEducationMapper.insert(recruitmentEducation);
    }

    @Override
    public void delete(Integer id) {
        recruitmentEducationMapper.deleteById(id);
    }
}
